<template>
  <div class="book-comment-list-item">
    <div>
      <span>{{ item.username }}</span>
      <span>{{ formatTime(item.commentDate) }}</span>
    </div>
    <div>{{ item.content }}</div>
  </div>
</template>

<script>
export default {
  name: "BookCommentListItem",
  props: {
    item: {
      type: Object,
      default: () => {},
    },
  },
  inject: ["formatTime"],
};
</script>

<style scoped>
.book-comment-list-item {
  border-bottom: 1px solid #000;
  margin-bottom: 10px;
}

.book-comment-list-item span {
  margin-right: 20px;
}
</style>
